'use strict';
const db = uniCloud.database();
exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	const user_table = db.collection("users");
	
		    let res2 = await user_table.add([
		    {
		        name: event.username
		    },{
		        password: event.password
		    },{
		        phone: event.phone
		    },{
				sex:event.sex
			}
		    ])
		console.log(event.username,event.password)
	//返回数据给客户端
	return {
		code:200
	}
	
};
